home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / ABUSESRC.ZIP / AbuseSrc / imlib / port / dos4gw / bwtcp.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-23  |  809 b   |  45 lines

  1. #include "jnet.hpp"
  2. #define PK_BUFFER_SIZE 4096
  3.  
  4. class bwt_out_socket : public out_socket
  5. {
  6.   int fd;
  7.   public :
  8.   uchar pk_buffer[PK_BUFFER_SIZE];  
  9.   long pk_buffer_ro,pk_buffer_last;
  10.   int try_connect(char *rhost, int port);
  11.   bwt_out_socket(int FD) { fd=FD; }
  12.   bwt_out_socket();
  13.   virtual int ready_to_read();
  14.   virtual int ready_to_write();
  15.   virtual int send(packet &pk);
  16.   virtual int get(packet &pk);
  17.   virtual ~bwt_out_socket();
  18.   void bwt_fill_buffer();
  19.   int get_fd() { return fd; }
  20. } ;
  21.  
  22.  
  23. class bwt_in_socket : public in_socket
  24. {
  25.   int port;
  26.   public :
  27.   bwt_in_socket(int Port);
  28.   bwt_out_socket *listeners[5];
  29.   virtual out_socket *check_for_connect();
  30.   virtual ~bwt_in_socket();
  31. } ;
  32.  
  33.  
  34. int bwt_init();
  35. void bwt_uninit();
  36. int bwt_get_my_ip();
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.